https://glot.io/snippets/gias5ctoq5/raw/main.lua